package com.atguigu.gulimall.ware.service;

import com.atguigu.gulimall.ware.vo.MergeVo;
import com.atguigu.gulimall.ware.vo.PurchaseDoneVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.ware.entity.PurchaseEntity;

import java.util.List;
import java.util.Map;

/**
 * 采购信息
 *
 * @author ShiJieLin
 * @email ShiJieLin@gmail.com
 * @date 2022-03-29 11:00:20
 */
public interface PurchaseService extends IService<PurchaseEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /** 合并采购单时，查询出采购单
     * @param params
     * @return
     */
    PageUtils queryPageUnreceivePurchase(Map<String, Object> params);

    /** 将采购需求合并成采购单
     *   1.指定采购单，就合并到指定的采购单
     *   2.未指定采购单，就创建一个采购但再合并
     * @param mergeVo
     */
    void mergePurchase(MergeVo mergeVo);

    /** 工作人员领取采购但
     * @param ids 采购单ID
     */
    void received(List<Long> ids);

    /** 工作人员完成采购
     * @param doneVo
     */
    void done(PurchaseDoneVo doneVo);
}

